<%	
	/*@ 扩展Object的静态方法 */
	Object.extend
	(
	 	Object,
		{		      
			clone: function($object) 
			{
				return Object.extend({},$object);
			},
			clear:function($object)
			{
				for(var iObject in $object){
					delete this[iObject];
				}				
			},
			inspect:function($object) 
			{
				try 
				{
					if ($object===undefined) return 'undefined';
					if ($object===null) return 'null';
					return $object.inspect ? $object.inspect():$object.toString();
				}catch(e) 
				{
					if (e instanceof RangeError) return '...';
					throw e;
				}
			},		
			isArray:function($object)
			{
				return $object&&$object.constructor===Array;
			},		      
			isFunction:function($object)
			{	
				return typeof $object=='function';
			},			
			isHash:function($object)
			{
				return $object instanceof Hash;
			},
			isNumber:function($object)
			{
				return typeof $object=='number';
			},				
			isNumeric:function($object)
			{
				return isNumeric($value);
			},		
			isString:function($object)
			{
				return typeof $object=='string';
			},					      		      
			isUndefined:function($object)
			{
				return typeof $object=='undefined';
			},				
			keys: function($object) 
			{
				var keys = [];
				for (var property in $object)
					keys.push(property);
				return keys;
			},
			values:function($object) 
			{
				var values=[];
				for (var property in $object)
				{
					values.push($object[property]);
				}
				return values;
			},			
			toJSON:function($object) 
			{
				var type=typeof $object;
				switch(type) 
				{
					case 'undefined':
					case 'function':
					case 'unknown': return;
					case 'boolean': return $object.toString();
				}			
				if($object===null) return 'null';
				if($object.toJSON) return $object.toJSON();
				//if(Object.isElement(object)) return;				
				var results=[];
				for(var property in $object){
					var value = Object.toJSON($object[property]);
					if(value!==undefined)
					results.push(property.toJSON() + ': ' + value);
				}			
				return '{'+results.join(', ')+'}';
			},			
			toQueryString:function($object) 
			{
				return $H($object).toQueryString();
			}
		}
	);
%>